<?php

include_once($_SERVER['DOCUMENT_ROOT'] . '/chisholm-swin/application/controllers/ccl_controller.php');

class online extends ccl_controller
{
	function __construct()
        {
            // Call the Model constructor
            parent::__construct();
        
            // Load database with "public" permissions
            $this->load->database('public');
            
            // Set template
            $this->template = 'template_online';
            
            // Load sidebar
            $this->data['sidebar'] = $this->load->view('public/online/sidebar', $this->data, true);

        }

	// View all volumes
	public function index( )
	{
		// Load the "home" view
		$this->data['main_content'] = $this->load->view('public/online/home_view', $this->data, true);
		
		// Load $this->data['main_content'] in the main template
		$this->load->view($this->template, $this->data);
	}

	public function articleReviews( $article='' )
	{
    // If article specified, load article 
    if ($article)
      $this->data['main_content'] = $this->load->view('public/online/articles/' . $article, $this->data, true);
    
    // Load the "Article Reviews" view
    else
        $this->data['main_content'] = $this->load->view('public/online/article_reviews_view', $this->data, true);
		
		// Load $this->data['main_content'] in the main template
		$this->load->view($this->template, $this->data);
	}	

 	public function aboutUs( )
	{
		// Load the "about_us" view
		$this->data['main_content'] = $this->load->view('public/online/about_us_view', $this->data, true);
		
		// Load $this->data['main_content'] in the main template
		$this->load->view($this->template, $this->data);
	}	

	public function ContactUs( )
	{
		// Load the "Contact Us" view
		$this->data['main_content'] = $this->load->view('public/online/contact_us_view', $this->data, true);
		
		// Load $this->data['main_content'] in the main template
		$this->load->view($this->template, $this->data);
	}
  
	public function faq( )
	{
		// Load the "raq" view
		$this->data['main_content'] = $this->load->view('public/online/faq', $this->data, true);
		
		// Load $this->data['main_content'] in the main template
		$this->load->view($this->template, $this->data);
	}
	
	public function newsAndEvents( )
	{
		// Load the "News and Events" view
		$this->data['main_content'] = $this->load->view('public/online/news_and_events_view', $this->data, true);
		
		// Load $this->data['main_content'] in the main template
		$this->load->view($this->template, $this->data);
	}	  

	public function openingHours( )
	{
		// Load the "Opening Hours" view
		$this->data['main_content'] = $this->load->view('public/online/opening_hours_view', $this->data, true);
		
		// Load $this->data['main_content'] in the main template
		$this->load->view($this->template, $this->data);
	}

	public function newBooks( )
	{
		// Load the "New Books" view
		$this->data['main_content'] = $this->load->view('public/online/new_books_view', $this->data, true);
		
		// Load $this->data['main_content'] in the main template
		$this->load->view($this->template, $this->data);
	}
	
	public function links( )
	{
		// Load the "links" view
		$this->data['main_content'] = $this->load->view('public/online/links_view', $this->data, true);
		
		// Load $this->data['main_content'] in the main template
		$this->load->view($this->template, $this->data);
	}
        
        public function privacyPolicy( )
        {
  		// Load the "links" view
		$this->data['main_content'] = $this->load->view('public/online/privacy_policy', $this->data, true);
		
		// Load $this->data['main_content'] in the main template
		$this->load->view($this->template, $this->data);          
        }
}

?>